home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form Folders
- BorderStyle = 1 'Fixed Single
- Caption = " Folders"
- ClientHeight = 3255
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 3855
- Icon = "Folders.frx":0000
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 3255
- ScaleWidth = 3855
- StartUpPosition = 2 'CenterScreen
- Begin VB.CommandButton cmdRemoveDir
- Caption = "Delete folder"
- Height = 375
- Left = 2160
- MouseIcon = "Folders.frx":0442
- MousePointer = 99 'Custom
- TabIndex = 5
- Top = 1800
- Width = 1575
- End
- Begin VB.CommandButton cmdMkdir
- Caption = "Create Folder"
- Height = 375
- Left = 2160
- MouseIcon = "Folders.frx":0594
- MousePointer = 99 'Custom
- TabIndex = 4
- Top = 2280
- Width = 1575
- End
- Begin VB.FileListBox File1
- Height = 1065
- Left = 2160
- Pattern = "*.htm*"
- TabIndex = 3
- Top = 120
- Width = 1575
- End
- Begin VB.CommandButton cmdExit
- Caption = "Exit"
- Height = 375
- Left = 2160
- MouseIcon = "Folders.frx":06E6
- MousePointer = 99 'Custom
- TabIndex = 2
- Top = 2760
- Width = 1575
- End
- Begin VB.CommandButton cmdSave
- Caption = "Save Path"
- Height = 375
- Left = 2160
- MouseIcon = "Folders.frx":0838
- MousePointer = 99 'Custom
- TabIndex = 1
- Top = 1320
- Width = 1575
- End
- Begin VB.DirListBox Dir1
- Height = 3015
- Left = 120
- TabIndex = 0
- Top = 120
- Width = 1935
- End
- Attribute VB_Name = "Folders"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- '#################################################'
- '## ## ----------------------------------- ## ##'
- '## ## Program name: Webpage Maker 2000 ## ##'
- '## ## Started in: October, 1999 ## ##'
- '## ## Author: David VanHook ## ##'
- '## ## ----------------------------------- ## ##'
- '#################################################'
- '----------------------VARIABLE SECTION-----------------------'
- Dim x As Integer
- Dim filepath As String
- Dim File As String
- Dim secTitle As String
- Dim subSecTitle As String
- Dim pathName As String
- '--------------------FORM UNLOAD SECTION----------------------'
- Private Sub cmdExit_Click()
- Unload Me
- End Sub
- '---------------------MAKE NEW DIRECTORY----------------------'
- Private Sub cmdMkdir_Click()
- On Error Resume Next
- If Right(Dir1.Path, 1) <> "\" Then
- filepath = Dir1.Path & "\"
- Else
- filepath = Dir1.Path
- End If
- MkDir (filepath & InputBox("Enter name of folder.", "Make new directory"))
- Dir1.Refresh
- End Sub
- '----------------------REMOVE DIRECTORY-----------------------'
- Private Sub cmdRemoveDir_Click()
- On Error Resume Next
- If Dir1.Path = "C:\" Or Dir1.Path = "C:\WINDOWS" Then
- Call MsgBox("Important directory! Can't be deleted.", vbExclamation, "Error")
- Exit Sub
- End If
- If Right(Dir1.Path, 1) = "\" Then
- filepath = Dir1.List(Dir1.ListIndex)
- Else
- filepath = Dir1.List(Dir1.ListIndex) & "\"
- End If
- Answer = MsgBox("Do you want to delete this file?", vbExclamation + vbYesNo, " Deletion confirmation")
- If Answer = vbYes Then
- Kill (filepath & "*.*")
- RmDir (filepath)
- Me.Refresh
- Dir1.Refresh
- End If
- End Sub
- '----------------SAVE FREQUENTLY USED FOLDER------------------'
- Private Sub cmdSave_Click()
- CompanyX.Combo1.AddItem Dir1.Path
- File = App.Path & "\wpm2000.ini" 'Path and file name of ini
- secTitle = "Folders" 'Section name
- For x = 0 To CompanyX.Combo1.ListCount - 1
- subSecTitle = "Favorite Folders" & x 'Subsection
- pathName = CompanyX.Combo1.List(x) 'Value to save
- NewNumber = WritePrivateProfileString(secTitle, subSecTitle, pathName, File)
- Next x
- End Sub
- '------------------SAVE FOLDER TO COMBOBOX--------------------'
- Private Sub Dir1_Change()
- File1 = Dir1
- For x = 0 To CompanyX.Combo1.ListCount
-
- If Dir1 = CompanyX.Combo1.List(x) Then
- cmdSave.Enabled = False
- Exit Sub
- Else
- cmdSave.Enabled = True
- End If
-
- Next x
- End Sub
- '---------------------FORM LOAD SECTION-----------------------'
- Private Sub Form_Load()
- Dir1.Path = "C:\"
- End Sub
-